<?php

include '../public/config/config.php';

$id = $_GET['id'] ? $_GET['id'] : 0;
//echo $id;
//QRcode::png('http://www.baidu.com');

$domain = $_SERVER['SERVER_NAME'];
$call_url = urlencode("http://".$domain."/work/wxweb/web/login_to.php");
$path .= "https://open.weixin.qq.com/connect/oauth2/authorize";
$path .= "?appid=".$appid;
$path .= "&redirect_uri=".$call_url;
$path .= "&response_type=code&scope=snsapi_userinfo";
$path .= "&state=".$id."#wechat_redirect";

header('location:'.$path);
























?>